package com.kai.steering.data.service.entity.domainObject;

import cn.hutool.core.bean.BeanUtil;
import com.kai.steering.data.service.entity.po.Permission;
import com.kai.steering.data.service.entity.po.WarehouseTest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "PermissionDO对象", description = "权限业务实体")

public class PermissionDO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "权限id")
    private String id;
    @ApiModelProperty(value = "权限名字")
    private String name;
    @ApiModelProperty(value = "权限详情")
    private String description;

    public PermissionDO(Permission permission) {
        convertPermissionDO(permission);
    }
    public PermissionDO convertPermissionDO(Permission permission){
        BeanUtil.copyProperties(permission, this);
        return this;
    }
}
